<?php $this->assign("title", "Agregar Reserva"); ?>
<h2>Agregar Reserva</h2>
<?php
	$this->start('css');
		echo $this->Html->css('jquery-ui/jquery-ui-1.10.3.custom.min.css');
	$this->end();

	$this->start('script');
		$this->Js->set('request', Router::url(array('controller' => 'Recorridos', 'action' => 'recorridos_por_ruta'), true));
		$this->Js->set('rutaRequest', Router::url(array('controller' => 'Rutas', 'action' => 'paradas_por_ruta'), true));
		$this->Js->set('config',$configurationReservas);
		if (!empty($this->request->data)) {
			$this->Js->set('postData', $this->request->data);
		}
		$this->Html->script("Reservas/Horarios.min", array("inline" => false));
		$this->Html->script("jquery-ui-1.10.3.custom.min", array("inline" => false));
	$this->end();


	echo $this->Form->create('Reserva');
	echo $this->Form->input("ruta", array("label" => "Ruta", "type" => "select", 'empty' => 'Elija...', "disabled" => "", "options" => $recorridos, "required" => "required"));
	echo $this->Form->input("parada", array("label" => "Parada", "type" => "select", 'empty' => 'Elija...', "disabled" => "", "options" => Array(), "required" => "required"));
	echo $this->Form->input("calendario", array("label" => "Calendario",  'empty' => 'Elija...', "disabled" => "", "required" => "required", "readonly"=>"readonly"));
	echo $this->Form->input("horario", array("label" => "Horario", "type" => "select", 'empty' => 'Elija...', "disabled" => "", "options" => Array(), "required" => "required"));
	echo $this->Form->input("terminos", array(
        'label' => 'Acepta ' . $this->Html->link('Términos y Condiciones', '/files/TerminosCondicionesReservas_miBus.pdf', array("target" => "_blank")),
        'type' => 'checkbox'
    ));
	echo $this->Form->end('Guardar Reserva');
?>